package au.edu.uq.itee.engg2800.team19;
import gnu.io.SerialPort;
public enum StopBits {

	SB_1(SerialPort.STOPBITS_1,"1"),
	SB_2(SerialPort.STOPBITS_2,"2");

	 private int code;
	 private final String displayName;

	 private StopBits(int c,final String displayName) {
	   code = c;
	   this.displayName=displayName;
	 }

	 public int getCode() {
	   return code;
	 }
	 public String toString(){
	     return displayName;
	}

	 static String[] enumsToStringArray() {
	        String[] results = new String[StopBits.values().length];
	        int count = 0;
	        for (StopBits each  : StopBits.values()) {
	            results[count] = each.toString();
	            count++;
	        }
	        return results;
	    }

}
